import { request } from "@/utils/service"
import type * as Permission from "@/api/system/types/permission";

/** 用户 **/
export function getUserListApi(params:Permission.GetUserListRequestData){
  return request<Permission.GetUserListResponseData>({
    url: "/sys/api/access/user/list",
    method: "get",
    params
  })
}
export function addUserApi(data:Permission.AddUserRequestData){
  return request<String>({
    url: "/sys/api/access/user/add",
    method: "post",
    data
  })
}

export function deleteUserApi(id:string){
  return request<String>({
    url: `/sys/api/access/user/delete/${id}`,
    method: "delete"
  })
}

/** 权限 **/

/** 角色 **/
export function getRoleListApi(params:Permission.GetRoleListRequestData){
  return request<Permission.GetRoleListResposneData>({
    url: "/sys/api/access/role/list",
    method: "get",
    params
  })
}
